import flask

app = flask.Flask(__name__)  # 创建服务器


@app.route("/", methods=["POST", "GET"])  # 路由指定
def inedx():  # 定义
    try:
        # 接收客户端数据   args是get方法  form是post方式
        # values 能接收get 和post
        p = flask.request.values.get('province')
        c = flask.request.args.get('city')
        n = flask.request.form.get('note')
        print(p)
        print(c)
        print(n)
        return p + "\n" + c + "\n" + n
    except Exception as err:
        print(err)


app.run()  # 运行
